// components/base/step-bar/index.js
const componentBehavior = require('../../../behaviors/component');
const { COMPONENT_OPTIONS } = require('../../../constants/common');

Component({
    behaviors: [componentBehavior],
    options: {
        ...COMPONENT_OPTIONS,
    },
    properties: {
        steps: {
            type: Array,
            value: [],
        },
        active: {
            type: Number,
            value: 0,
        },
    },
    data: {
    },
    methods: {
        handleClick(e) {
            const { index } = e.currentTarget.dataset;
            this.triggerEvent('click', index);
        },
    }
})
